package com.smmisia.article.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.smmisia.article.dto.response.UserSimpleInfoDTO;
import com.smmisia.article.entity.Article;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface ArticleMapper extends BaseMapper<Article> {

    UserSimpleInfoDTO likedCount(Integer id);

    //TODO BUG1
    Map<String, Long> selectInfo();

    List<Article> findLimit(@Param("index") int index, @Param("pageSize") int pageSize);

    List<Article> findNewPage(@Param("id") String id, @Param("pageSize") int pageSize);

    List<Article> likeSearch(String keyword);

    List<Map<String, Object>> getUserArticleRank();
}




